package com.lpf;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Md5Python_0 {

    private static final String python = "E:\\DevelopTools\\Python310\\python.exe";
    private static final String pythonFuncFilePath = "E:\\IdeaProjects\\java-learning\\07-java-python\\src\\main\\resources\\apps\\md5\\main\\run_0.py";
    private static final String encryption = "encryption";

    public static void main(String[] args) throws Exception {
        String[] params = new String[]{python, pythonFuncFilePath, encryption, "单点", "小写"};
        Process proc = Runtime.getRuntime().exec(params);
        BufferedReader in = new BufferedReader(new InputStreamReader(proc.getInputStream(), "GBK"));
        String line;
        String result = null;
        while ((line = in.readLine()) != null) {
            result = line;
        }
        System.out.println(result);
        in.close();
        proc.waitFor();
    }
}
